home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / fdate61a.zip / FDATE.DOC < prev    next >
Text File  |  1992-02-15  |  48KB  |  1,211 lines

  1. FDATE      Version 6.1a                          Feb 14, 1992
  2. ===================================================================
  3. FDATE: a utility for date manipulation in batch files.
  4. ===================================================================
  5. Stephen Ferg             5113 N. 8th Road, Arlington, VA 22205-1201
  6. Voice (703) 525-2241     CompuServe 73377,1157
  7.  
  8. =======================================================================
  9. Format:
  10. FDATE /Ffunc /Adate /Bdate /Iformat /Oformat
  11.              /Nnum /Ddayofweek /Pstring /Sstring
  12. =======================================================================
  13.  
  14.  
  15. FDATE PARAMETERS
  16. ================
  17.  
  18. The parameters that are required depend on the function requested.
  19. Parameters that are specified, but not needed, are ignored.
  20. Executing FDATE without any parameters displays a brief help screen.
  21.  
  22. Parameters can be in any order and upper or lower case.
  23.      Note that although format specifications are not case sensitive,
  24.      they ARE "text sensitive".  If any characters are missing,
  25.      added, or mistyped, the format specification will be rejected.
  26.      (A common mistake is to enter "/format" instead of "/Fformat".
  27.       This mistake can be avoided by using the /Ff function alias.)
  28.  
  29.  /F  requests a particular FDATE function
  30.      If this parameter is not specified, or is specified incorrectly,
  31.      FDATE displays a help screen.  If you unexpectedly get the help
  32.      screen displayed, you probably have omitted the /F parameter.
  33.  
  34.  /N  number of days (always a number)
  35.  
  36.  /D  day-of-week number (used only with W function)
  37.  
  38.  /A  date A  (for date functions)
  39.  /B  date B  (for date functions)
  40.      If the /A parameter is omitted, /Atoday is assumed.
  41.      If the /B parameter is omitted, /Btoday is assumed.
  42.  
  43.  /A  number A  (for math functions)
  44.  /B  number B  (for math functions)
  45.  
  46.  /I  specifies format of input date(s)
  47.      If the /I parameter is omitted, /Imm-dd-ccyy is assumed.
  48.  
  49.  /O  specifies format of output date
  50.      If the /O parameter is omitted, /Od1 is assumed.
  51.  
  52.  /L  specifies language of output.
  53.      /Lus   US (American) English-language output
  54.      /Lfr   French-language output
  55.      If the /L parameter is omitted, /Lus [American English] is assumed.
  56.  
  57.  /V  specifies that output is to be placed in an environment variable
  58.      rather than written to standard output (i.e. to the screen).
  59.  
  60.  /P  specifies a prefix string for the output
  61.  /S  specifies a suffix string for the output
  62.      Maximum length for a prefix or suffix string is 80 bytes.
  63.      These optional parameters may always be specified or omitted.
  64.      They must be enclosed in single quotes, double quotes, or
  65.                   square brackets
  66.  
  67.      Note that "whitespace" will be removed from these strings,
  68.      so formatting of /P and /S strings cannot be controlled using
  69.      spaces.  To format strings, use periods or ASCII 255 (hex'ff')
  70.      as filler.
  71.  
  72.      EXAMPLES
  73.      FDATE /Ff   /At /Od1         /P"Today is "
  74.      FDATE /Fdif /At /B12-25-TTTT /S" days until Christmas"
  75.      FDATE /Fdif /At /B12-25-TTTT /P"It is " /S" days 'til Xmas"
  76.      FDATE /Ff       /A05-08-TTTT /S[ -- "Buffalo Bill's" birthday]
  77.  
  78.  
  79.  
  80. ERROR HANDLING
  81. ==============
  82.  
  83.    If FDATE detects an error:
  84.  
  85.      (1) it will return an errorlevel of 1 (rather than 0), and
  86.      (2) its output will be 3 lines:
  87.        * the word ERROR
  88.        * a DOS batch-file ECHO statement that displays an error message
  89.        * a DOS batch-file PAUSE statement
  90.  
  91.    If Fdate output is displayed directly, or redirected to NUL:
  92.    you can detect an error by testing the errorlevel for a value of 1.
  93.  
  94.    If Fdate output is piped to an environment manipulation utility such
  95.    as STRINGS or GET, the environment variable will be set to ERROR.
  96.    Errorlevel will be set by STRINGS/GET, and will probably be 0.
  97.    In such a case, the only way to detect an error is to test the
  98.    environment variable for the value ERROR.
  99.  
  100.    If FDATE output is redirected to a batch file, which is then
  101.    CALLed to set an environment variable, the batch file will:
  102.      * set the environment variable to ERROR,
  103.      * ECHO the error message, and
  104.      * pause.
  105.    You can detect an error by testing errorlevel for the value 1
  106.    either before or after you CALL the batch file.
  107.    You can detect an error by testing the environment variable for the
  108.    value ERROR, AFTER you have CALLed the batch file.
  109.  
  110. ----------------------------------------------------------------------
  111.  
  112.  EXAMPLE:
  113.    rem use FDATE to check validity of year in parm %1
  114.    Fdate /Ff /Imm-dd-ccyy /ATT-TT-%1 /Occyy /P"Received year parm: "
  115.    if errorlevel 1 echo Year parm [%1] is not valid.
  116.    if errorlevel 1 goto endit
  117.  
  118.  EXAMPLE:
  119.    rem use FDATE to verify %1, and GET to put it into %year%
  120.    Fdate /Ff /Imm-dd-ccyy /ATT-TT-%1 /Occyy | GET ZE /V%year% >nul
  121.    if (%year%)==(ERROR) echo Year parm [%1] is not valid.
  122.    if (%year%)==(ERROR) goto endit
  123.  
  124.  EXAMPLE:
  125.    rem use FDATE to verify %1, call a batch file to put it into %year%
  126.    Fdate /Ff /Imm-dd-ccyy /ATT-TT-%1 /Occyy /P"@set year=">junktemp.bat
  127.    call junktemp.bat
  128.    del  junktemp.bat
  129.    if errorlevel 1 echo Year parm [%1] is not valid.
  130.    if errorlevel 1 goto endit
  131.  
  132. SYMBOL CONVENTIONS
  133. ==================
  134.  
  135. The following symbols are used in specifying date formats:
  136.  
  137. SYMBOL  EXAMPLE   MEANING
  138. ------  -------   -------------------------------------
  139. cc        19      century
  140. yy        93      year
  141. mm        02      month
  142. zm         2      month without leading zero
  143. dd        08      day
  144. zd         8      day   without leading zero
  145. mn       February month name
  146. mn3      Feb      month name, first 3 characters only
  147. dow      Tuesday  day of week
  148. dow3     Tue      day of week, first 3 characters only
  149. dow#      3       day of week as a number (Sunday=1, Monday = 2, etc.)
  150. today             is a "pseudodate" representing the current date
  151. t                 is an alias for the "today" pseudodate
  152. hh:mm    09:05    hours and minutes
  153. hhmm     0905     hours and minutes
  154. ss        09      seconds
  155.  
  156.  
  157.  
  158. PSEUDODATES
  159. ===========
  160.  
  161. t (or today)
  162.           can be used with either /A or /B, e.g. /Atoday or /At.
  163.  
  164. EXAMPLE
  165.           rem Get the date that is 90 days from today
  166.           FDATE /Fadd /N90 /Atoday /Omm-dd-ccyy
  167.           FDATE /Fadd /N90 /At     /Omm-dd-ccyy
  168.  
  169.           rem determine if this year is a leapyear
  170.           FDATE /Ff /At /OLY
  171.  
  172. tt        when used in place of a 2-digit DD string, will cause
  173.           Fdate to use today's day-of-the-month.
  174.           Example:    FDATE /Ff /Imm-dd-ccyy /A01-tt-1992 /Od1
  175.  
  176. tt        when used in place of a 2-digit MM string, will cause
  177.           Fdate to use today's month.
  178.           Example:    FDATE /Ff /Imm-dd-ccyy /Att-01-1992 /Od1
  179.  
  180. tt        when used in place of a 2-digit YY string, will cause
  181.           Fdate to use today's year (CCYY).
  182.           Example:    FDATE /Ff /Imm-dd-yy /A01-01-tt /Od1
  183.  
  184.           Note that TT can NOT be used for only the YY part of a CCYY
  185.           input year.  The following, for example, is NOT valid:
  186.           Example:    FDATE /Ff /Imm-dd-ccyy /A01-01-19tt /Od1
  187.  
  188. tttt      when used in place of a 4-digit CCYY string, will cause
  189.           Fdate to use today's year (CCYY).
  190.           Example:    FDATE /Ff /Imm-dd-ccyy /A01-01-tttt /Od1
  191.  
  192.  
  193. EXAMPLES:
  194.  
  195. Show the first Monday in the second quarter of this year
  196. FDATE /Fw /Iccyymmdd /Atttt0301 /D2 /N1 /Od1 /P"First Monday in QTR#2: "
  197.  
  198. Show the last Friday on/before the 15th of this month.
  199. FDATE /Fw /Iccyymmdd /Atttttt15 /D6 /N-1 /Od1 /P"Friday before the 15th: "
  200.  
  201.  
  202. INPUT FORMATS
  203. =============
  204.  
  205. NOTE
  206. If ALL input dates are specified using the "today" pseudodate, (i.e.
  207. /At, /Bt) then it is not necessary to supply an input format using /I.
  208.  
  209. FORMAT      EXAMPLES      DISCUSSION
  210. ------      ---------     -----------------------------
  211. ccyymmdd    19922002
  212.  
  213. mm-dd-ccyy  02-20-1992    In an input format specification, the dash
  214.             02/20/1992    symbols represent ANY non-numeric symbol.
  215.  
  216.              2-5-1992     Leading zeros need not be present.
  217.              2/5/1992
  218.  
  219. mm-dd-yy    02-20-92      February 2, 1992 [see below, **]
  220.  
  221.  
  222.                 JULIAN INPUT FORMATS
  223. -----------------------------------------------------------------------
  224. NOTE:   * JJJ can actually be 1 - 4 digits
  225.         * may include a prefix of a plus or minus ( + or - ) sign
  226. -----------------------------------------------------------------------
  227.  
  228. ccyyjjj     1992003       Third day of 1992, i.e. Jan 3, 1992
  229.             19923         Third day of 1992
  230.             tttt003       Third day of this year
  231.             tttt3         Third day of this year
  232.  
  233.   yyjjj       92003       Third day of 1992
  234.               923         Third day of 1992
  235.               tt003       Third day of this year
  236.               tt3         Third day of this year
  237.               01003       Third day of 2001 [see below, **]
  238.  
  239.  
  240. NOTE THAT FDATE WILL ACCEPT "JJJ" OF LESS THAN 1 & MORE THAN 366.
  241. -----------------------------------------------------------------
  242.  
  243.   yyjjj       tt1000      the 1000th day from beginning of this year
  244.               tt0         last day of last year
  245.               tt-1        next-to-last day of last year
  246.  
  247. FDATE /Ff /Iccyyjjj /Od1 /A1992-1  produces... Monday December 30, 1991
  248. FDATE /Ff /Iccyyjjj /Od1 /A19920   produces... Tuesday December 31, 1991
  249. FDATE /Ff /Iccyyjjj /Od1 /A1992+1  produces... Wednesday January 1, 1992
  250.  
  251. FDATE /Ff /Iccyyjjj /Od1 /A1992366 produces... Thursday December 31, 1992
  252. FDATE /Ff /Iccyyjjj /Od1 /A1992367 produces... Friday January 1, 1993
  253.  
  254. This feature allows limited date arithmetic with ordinary business
  255. Julian days.  For example, 90 days from tt300 can be shown by:
  256.  
  257.                   FDATE /Ff /Iyyjjj /Att390
  258.  
  259.  
  260.  
  261.  
  262. FDATE'S CENTURY-ASSUMPTION ALGORITHM **
  263. ====================================
  264. If an input date is supplied in a format in which the year is
  265. specified without a century -- that is, as YY rather than CCYY --
  266. then Fdate does not automatically use the current century.
  267. Instead,
  268.  
  269.    *  if YY is greater than 20,       then FDATE assumes CC = 19
  270.    *  if YY is less than or equal 20, then FDATE assumes CC = 20
  271.  
  272. Examples:
  273.          21    becomes  1921
  274.          ...
  275.          99    becomes  1999
  276.          00    becomes  2000
  277.          01    becomes  2001
  278.          ...
  279.          20    becomes  2020
  280. but then (again)
  281.          21    becomes  1921
  282.  
  283. To put it simply, FDATE makes what would be a reasonable assumption
  284. about the century for someone operating in the 1990's: it looks back to
  285. 1921 and forward to 2020.  If both I and FDATE are still alive in the
  286. year 2000, I'll probably update FDATE's century-assumption algorithm to
  287. shift it forward several decades.
  288.  
  289.  
  290. OUTPUT FORMATS
  291. ==============
  292.  
  293. FORMAT        EXAMPLES      DISCUSSION
  294. ------        ---------     -----------------------------
  295.  
  296. dd-mn3-yy     08-Feb-92     CompuServe-style date
  297.  
  298. ccyy          1993
  299. ccyymm        199302        useful for triggering monthly processing
  300. ccyymmdd      19930208      useful for putting current date in filename
  301.   yymmdd        908208      useful for putting current date in filename
  302.     mmdd          0208
  303.       dd            08
  304.       zd             8
  305.  
  306. In the following formats, months precede days (American style)
  307. ------------------------------------------------------------------
  308. mm/dd/ccyy    02/08/1993
  309. mm-dd-ccyy    02-08-1993
  310. mm.dd.ccyy    02.08.1993    British-style dates
  311.  
  312. zm/zd/ccyy     2/8/1993     no leading zeros in day or month
  313. zm-zd-ccyy     2-8-1993     no leading zeros in day or month
  314. zm.zd.ccyy     2.8.1993     British-style dates
  315.  
  316. mm/dd/yy      02/08/92
  317. mm-dd-yy      02-08-92
  318. mm.dd.yy      02.08.92      British-style dates
  319.  
  320. zm/zd/yy       2/8/92       no leading zeros in day or month
  321. zm-zd-yy       2-8-92       no leading zeros in day or month
  322. zm.zd.yy       2.8.92       no leading zeros in day or month
  323.  
  324. In the following formats, days precede months  (European style)
  325. ------------------------------------------------------------------
  326. dd/mm/ccyy    02/08/1993
  327. dd-mm-ccyy    02-08-1993
  328. dd.mm.ccyy    02.08.1993    British-style dates
  329.  
  330. zd/zm/ccyy     2/8/1993     no leading zeros in day or month
  331. zd-zm-ccyy     2-8-1993     no leading zeros in day or month
  332. zd.zm.ccyy     2.8.1993     British-style dates
  333.  
  334. dd/mm/yy      02/08/92
  335. dd-mm-yy      02-08-92
  336. dd.mm.yy      02.08.92      British-style dates
  337.  
  338. zd/zm/yy       2/8/92       no leading zeros in day or month
  339. zd-zm-yy       2-8-92       no leading zeros in day or month
  340. zd.zm.yy       2.8.92       British-style dates
  341.  
  342. ------------------------------------------------------------------
  343.  
  344. Day-of-the-week output formats
  345. ------------------------------------------------------------------
  346.  
  347. dow#           5            Sunday=1, Monday=2 .... Saturday=7.
  348.  
  349. dow            Thursday     name of day of week
  350.                Jeudi        if /Lfr specified
  351.  
  352. dow3           Thu          first 3 characters of name of day of week
  353.                Jeu          if /Lfr specified
  354.  
  355. mn             February     name of month
  356.                Fevrier      if /Lfr specified
  357.  
  358. mn3            Feb          first 3 characters of name of month
  359.                Fev          if /Lfr specified
  360.  
  361. ------------------------------------------------------------------
  362.  
  363.  
  364. LY              0           1 if year is a leapyear, otherwise 0.
  365.                                ------------------------------------
  366.                                365 + this number gives total
  367.                                      number of days in the year.
  368.                                 28 + this number gives total
  369.                                      number of days in February.
  370.                                ------------------------------------
  371.  
  372. d1           Saturday, February 5, 1992
  373.              le Samedi 5 Fevrier 1992      [/Lfr specified]
  374.  
  375. t1            9:05 am
  376.               9:05 pm
  377.  
  378. HH:MM        09:05      24-hour time, hours:minutes
  379.              21:05
  380. HHMM         0905
  381.              2105
  382.  
  383. HH:MM:SS     21:05:30   24-hour time, hours:minutes:seconds
  384. HHMMSS       210530
  385.  
  386. full          9:05 pm on Saturday, February 5, 1992
  387.               9:05 pm le Samedi 5 Fevrier 1992      [/Lfr specified]
  388. -----------------------------------------------------------------------
  389. NOTE that the following formats contain embedded spaces.  Consequently
  390. they must be enclosed in double quotes. EXAMPLE: /O"mn zd, ccyy".
  391. -----------------------------------------------------------------------
  392. "zd mn ccyy"      5 February 1992
  393. "zd mn, ccyy"     5 February, 1992
  394. "mn3 dd ccyy"     Feb 05 1992
  395. "mn3 dd, ccyy"    Feb 05, 1992
  396. "mn zd, ccyy"     February 5, 1992
  397.  
  398.  
  399.  
  400. "JULIAN" OUTPUT FORMATS
  401. =======================
  402.  
  403. FORMAT        EXAMPLES      DISCUSSION
  404. ------        ---------     -----------------------------
  405.  
  406. julian             27       BUSINESS "Julian date" expressed as number
  407.                             of days since January 1 of the same year.
  408.                             NOTE: with this format leading zeros are
  409.                             suppressed.
  410.  
  411. CCyyjjj       1992027       Jan 27, 1992
  412.   yyjjj         92027       "
  413.     JJJ           027       "
  414.                             BUSINESS "Julian date" expressed as number
  415.                             of days since January 1 of the same year.
  416.                             NOTE: with these formats leading zeros are
  417.                             retained.
  418.  
  419. day#           727198       TRUE "Julian date" expressed as number
  420.                             of days since January 1, 0001.
  421.  
  422. minute#         33088       "Julian minutes": time expressed as number
  423.                             of minutes  since midnight, January 1, 1990.
  424.  
  425. second#        633088       "Julian seconds": time expressed as number
  426.                             of seconds  since midnight, January 1, 1990.
  427.  
  428. ----------------------------------------------------------------------
  429.    Running FDATE with /O parameter for a "Julian time" produces a
  430.    number based on the current time of day and the date in the /A parm.
  431.  
  432.    If, on January 10, 1992 at 2 pm, you run FDATE this way:
  433.        FDATE /Ff /Atoday /Ominute#
  434.    it will produce the Julian minute for January 10, 1992 at 2 pm.
  435.  
  436.    If, on January 10, 1992 at 2 pm, you run FDATE this way:
  437.        FDATE /Ff /A01-15-1992 /Imm-dd-ccyy  /Ominute#
  438.    it will produce the Julian minute for January 15, 1992 at 2 pm.
  439. ----------------------------------------------------------------------
  440.  
  441. DATE FUNCTIONS
  442. ==============
  443.  
  444. FUNCTION  FDATE /Ffunc /Adate /Iformat /Oformat
  445. --------  -------------------------------------------
  446. format    this is a synonym for function "f"
  447.  
  448. f         returns /Adate in format specified by /Oformat
  449.           Since /Aformat and /Oformat can be different, the FORMAT
  450.           function is used to change a date from one format to another.
  451.           Because of the wide variety of output formats, the FORMAT
  452.           function can also be used to determine the day of week of the
  453.           date, whether the date is in a normal or leap year, etc.
  454.  
  455. EXAMPLES
  456.           FDATE /Ff /A19920101 /Iccyymmdd /O"mn zd, ccyy"
  457.           FDATE /Ff       /Atoday         /Od1
  458.           FDATE /Fformat  /Atoday         /Od1
  459.  
  460.  
  461.  
  462. FUNCTION  FDATE /Ffunc /Nnumdays /Adate /Iformat /Oformat
  463. --------  -------------------------------------------
  464. add       Adds      /Ndays to   /Adate, produces date in /Oformat format
  465. sub       Subtracts /Ndays from /Adate, produces date in /Oformat format
  466.  
  467. EXAMPLES
  468.           FDATE /Fadd /N90 /A01-01-1992 /Imm-dd-ccyy /Od1
  469.           FDATE /Fsub /N90 /A01-01-1992 /Imm-dd-ccyy /Od1
  470.           FDATE /Fadd /N90 /Atoday                   /Od1
  471.  
  472.  
  473.  
  474. FUNCTION  FDATE /Ffunc /Adate /Bdate /Iformat
  475. --------  -------------------------------------------
  476. comp      compares the dates specified on the /A and /B parms.
  477.           returns         when
  478.             LT            /A  is less than    (earlier than) /B
  479.             EQ            /A  is equal to     (same as)      /B
  480.             GT            /A  is greater than (later than)   /B
  481.  
  482. dif       Returns number of days between /Adate and /Bdate
  483.           Order of the two dates is not significant.
  484.           Note that for DIF, both dates must be in the SAME
  485.           format, the input format specified in /Iformat.
  486.           If the two dates are not in the same format, reformat one
  487.           of the dates using the /Ff function and
  488.           a utility like STRINGS or GET.
  489.  
  490. EXAMPLES
  491.           FDATE /Fdif /A01-01-1992 /B11-11-1992  /Imm-dd-ccyy
  492.           FDATE /Fdif /A11-11-1992 /B01-01-1992  /Imm-dd-ccyy
  493.           FDATE /Fdif /Atoday      /B01-01-1992  /Imm-dd-ccyy
  494.  
  495.  
  496. FUNCTION  FDATE /Ffunc /Adate /Iformat /Oformat /Ddow#  /Ndow-count
  497. --------  -----------------------------------------------------------
  498. w         W (weekday) function.
  499.           This function accepts a date specification in parm /A and
  500.           returns the date of the /Nth /Day-of-the-week
  501.           before or after /Adate.  For example:
  502.  
  503.           If    /A specifies November 14, 1992
  504.                 /D specifies the number for Thursday (i.e., 5)
  505.                 /N specifies a week count of 3
  506.           then /Fw returns the date of the third Thursday after
  507.           November 14, 1992. (See full example, below)
  508.  
  509.           Note that /N may be negative.  If, in the above example, /N
  510.           is specified as -3, then Fdate returns the date of the third
  511.           Thursday BEFORE November 14, 1992.
  512.  
  513.           If the date specified on the /A parms falls on the same day
  514.           of the week as was specified on the /D parm, then that will
  515.           be considered to be the first date meeting that day-of-week
  516.           criterion.  That is, If November 14, 1992 fell on a
  517.           Thursday, and if /N was 1 or -1, then the output date would
  518.           be the same as the input date, i.e.  November 14, 1992.
  519.  
  520.           The acceptable values for /N (number of weeks) is in
  521.           the range of 99..-99.  A value of zero (i.e. /N0) is invalid.
  522.  
  523. EXAMPLES
  524.      find date of Thanksgiving (4th Thursday in November) in 1992
  525.          FDATE /Fw /A11-01-1992 /Imm-dd-ccyy /D5 /N4 /Od1
  526.      returns: Thursday November 26, 1992
  527.  
  528.      find the beginning of the work-week (Monday, 2nd day of week)
  529.      AFTER Thanksgiving, 1992
  530.          FDATE /Fw /A11-26-1992 /Imm-dd-ccyy /D2 /N1 /Od1
  531.  
  532.      find the beginning of the work-week (Monday, 2nd day of week)
  533.      BEFORE Thanksgiving, 1992
  534.          FDATE /Fw /A11-26-1992 /Imm-dd-ccyy /D2 /N-1 /Od1
  535.  
  536.  
  537. MATH FUNCTIONS
  538. ==============
  539.  
  540. FUNCTION  FDATE /Ffunc /Anum  /Bnum
  541. --------  -------------------------------------------
  542.  
  543. #add      returns the sum of the integers specified
  544.           on the /A and /B parms.  Can be used to calculate the
  545.           "Julian" minute(second, date) in the future from a given
  546.           "Julian" minute(second, date).
  547.  
  548. #sub      (not supported)
  549.           no numeric subtraction operation (as such) is supported.
  550.           Often, you will find that #dif will do what you want.
  551.           #dif is the same as subtraction in which the smaller
  552.           number is subtracted from the larger number; it will never
  553.           return a negative number.  If you really MUST have
  554.           subtraction, which might return a negative result, you can
  555.           add two numbers, one of which is a negative number.
  556.           For example, to subtract 3 from 2:
  557.               FDATE /F#add /A2 /B-3          [ returns: -1 ]
  558.  
  559. #dif      returns the difference between the integers specified
  560.           on the /A and /B parms.  Can be used to calculate the
  561.           number of minutes(seconds, days) between two
  562.           "Julian"  minutes(seconds, dates).
  563.  
  564. #comp     compares the integers specified on the /A and /B parms.
  565.           returns         when
  566.             LT            /A  is less    than /B
  567.             EQ            /A  is equal   to   /B
  568.             GT            /A  is greater than /B
  569.  
  570.  
  571. PUTTING FDATE OUTPUT INTO AN ENVIRONMENT VARIABLE USING /V
  572. ===========================================================
  573.  
  574. Starting with version 6.1, Fdate supports a /V (environment variable)
  575. parameter.  A user can use /V to tell Fdate to put its output directly
  576. into an environment variable. (Fdate attempts to put output into an
  577. environment variable in the master, rather than the local, environment.)
  578.  
  579. Note that due to the complexities of manipulating the environment, /V
  580. may not always work. If you encounter a situation in which it does not,
  581. you may be able to use one of the alternative techniques described in
  582. the next section.
  583.  
  584. /Vevar tells Fdate to put output into an environmental variable
  585. whose name is "evar".  For example:
  586.  
  587.                 Fdate /Ff /Vdate1
  588.  
  589. will set the environment variable DATE1 to the current date.  If
  590. you type SET at the DOS prompt, you should see something like:
  591.  
  592.                 DATE1=Friday February 14, 1992
  593.  
  594. If you specify /V without an evar name, the evar name defaults to FDATE.
  595.  
  596. Example :       Fdate /Ff /V
  597. produces:       FDATE=Friday February 14, 1992
  598.  
  599. If you do not use /V, Fdate output is written to standard output, that
  600. is, to the screen.
  601.  
  602.  
  603.  
  604.  
  605. PUTTING FDATE OUTPUT INTO AN ENVIRONMENT VARIABLE WITHOUT USING /V
  606. ===================================================================
  607.  
  608. Manipulating the environment is an incredibly tricky business.  There
  609. are questions of the local versus master environment, the version of DOS
  610. you are running, and the environment under which you are running (DOS,
  611. Windows, Carousel).  In order to keep FDATE focussed on date-related
  612. issues, versions of Fdate prior to 6.1 did not attempt to put output
  613. directly into an environment variable.  Instead, FDATE's output was
  614. written to standard output, that is, it was displayed on the screen.
  615. Output could then be redirected to a batch file, or piped to a utility
  616. (such as STRINGS or GET), that would put the output into an environment
  617. variable.
  618.  
  619. Starting with version 6.1, Fdate supports a /V (environment variable)
  620. parameter.  A user can use /V to tell Fdate to put its output directly
  621. into an environment variable.  HOWEVER.... due to the complexities of
  622. environment manipulation, there may be circumstances where /V doesn't
  623. work.  These include shelling to DOS, or running under Windows,
  624. Carousel, etc.  In such cases, you will need to fall back on more basic
  625. methods.
  626.  
  627. One way to put FDATE's output into an environment variable is to use
  628. the /P (prefix string) feature to create a DOS "SET" statement,
  629. redirect the output to a batch file, and CALL the batch file.
  630. Since CALL first appeared in DOS 3.3, you will need DOS 3.3 or
  631. greater to use this technique.
  632.  
  633.   FDATE /Ff /Atoday /O"mn zd, ccyy" /P"@SET FDATE=" >JUNKTEMP.BAT
  634.   call JUNKTEMP.BAT
  635.   del  JUNKTEMP.BAT
  636.  
  637. There are also shareware and public domain utilities that are written
  638. specifically to manipulate environment variables, and do that job very
  639. well.  FDATE's output can be put into an environment variable by piping
  640. it to one of these utilities.  When piping FDATE output to a utility,
  641. you can prevent the output from being ECHOed to the screen by
  642. redirecting the output to NUL.
  643.  
  644.    EXAMPLE: use STRINGS to put date into DATE1 environment variable
  645.    FDATE /Ff /At /Od1 | STRINGS date1= ASK >NUL
  646.  
  647.    -----------------------------------------------------------------
  648.    I recommend Bob Stephan's GET and PC Magazine's STRINGS.
  649.  
  650.    As of February 14, 1992, the current version of GET is 2.5.
  651.    On CompuServe, use IBMFF to look for GET*.ZIP (e.g. GET25.ZIP for
  652.    version 2.5) in CIS:IBMSYS, or for GET.ZIP in ZNT:UTILFORUM, lib 16.
  653.    GET is also available from the Public Software Library in Houston.
  654.  
  655.    As of February 14, 1992, the current version of STRINGS is 1.3.
  656.    On CompuServe, look for STRING.ZIP in the PC Magazine Utilities
  657.    Lib of ZNT:UTILFORUM.  STRHYP.ZIP contains good hypertext
  658.    documentation on STRINGS.
  659.    -----------------------------------------------------------------
  660.  
  661. =======================================================================
  662. EXAMPLE #1
  663. Redirect FDATE output to a file, or to a callable batch file,
  664. or pipe it to STRINGS or GET to store it in an environment variable
  665. =======================================================================
  666. rem display Fdate output on screen
  667. FDATE /Ff /At /Od1 /P"Today is "
  668.  
  669. rem Redirect FDATE output to a file
  670. FDATE /Ff /At /Od1 /P"Today is " >FDATE.OUT
  671.  
  672. rem Redirect FDATE output to a callable batch file
  673. FDATE /Ff /Atoday /O"mn zd, ccyy" /P"@SET DATE1=" >JUNKTEMP.BAT
  674. call JUNKTEMP.BAT
  675. del  JUNKTEMP.BAT
  676.  
  677. rem Pipe FDATE output to STRINGS to store it in DATE1 environment var
  678. FDATE /Ff /Atoday /O"mn zd, ccyy" |STRINGS date1= ASK >NUL
  679.  
  680. rem Pipe FDATE output to GET to store it in DATE1 environment var
  681. FDATE /Ff /Atoday /O"mn zd, ccyy" |GET ZE /Vdate1 >NUL
  682.  
  683.  
  684.  
  685. =======================================================================
  686. EXAMPLE #2
  687. Find the difference (in days) between two dates in different formats
  688. Use GET to put FDATE output into environment variables.
  689. =======================================================================
  690. set date1=05-10-1992
  691.  
  692. rem reformat date literal into same format as date1
  693. FDATE /Ff /Imm-dd-yy   /A05-08-92 /Omm-dd-ccyy | GET ZE /Vdate2>NUL
  694.  
  695. rem get difference between date1 and date2
  696. FDATE /Fdif /Imm-dd-ccyy /A%date1%  /B%date2%| GET ZE /vdiff>NUL
  697.  
  698. echo The difference is %diff% days.
  699.  
  700.  
  701.  
  702.  
  703. =======================================================================
  704. EXAMPLE #3
  705. Schedule a program to run at a specified time in the future.  Note that
  706. this involves a lot of disk activity because DOS re-reads the batch
  707. file from disk every time it does a GOTO LOOPTOP.  If you do this, it
  708. is a good idea to run the batch file from a RAM DISK.
  709. =======================================================================
  710. REM GET CURRENT JULIAN MINUTE AND PUT IN ENVIRONMENT VARIABLE RUNTIME
  711. FDATE /Ff /At /Ominute#  |STRINGS RunTime= ASK >NUL
  712.  
  713. REM ADD 120 MINUTES (2 HOURS) TO ENVIRONMENT VARIABLE RUNTIME
  714. FDATE /F#add /A%RunTime% /B120 |STRINGS RunTime= ASK >NUL
  715.  
  716. REM LOOP UNTIL NOWTIME HAS REACHED RUNTIME
  717. :LoopTop
  718.   FDATE /Ff /At  /Ominute#   |STRINGS NowTime=  ASK >NUL
  719.   FDATE /F#comp  /A%NowTime% /B%RunTime% |STRINGS TimeComp= ASK >NUL
  720.   if (%TimeComp%)==(LT) goto loopTOP
  721. :LoopEnd
  722.  
  723. echo STARTING EXECUTION OF APPLICATION: [program name]
  724.  
  725.  
  726.  
  727. =======================================================================
  728. EXAMPLE #4
  729. Rename file BACKUP.LOG to a name that contains today's date
  730. =======================================================================
  731. FDATE /Ff /Atoday /Oyymmdd /P"@SET DATE1=" >JUNKTEMP.BAT
  732. call JUNKTEMP.BAT
  733. del  JUNKTEMP.BAT
  734. ren  BACKUP.LOG  BK%DATE1%.LOG
  735. SET  DATE1=
  736.  
  737.  
  738.  
  739. =======================================================================
  740. EXAMPLE #4b
  741. Use FDATE to rename a log file to a name that will be unique within a
  742. minute time-frame.  This is a way to keep an historical record of a
  743. series of log files.  Since the file will retain its original date/time
  744. stamp, you will still be able easily to tell when it was created.
  745. In this example, we use GET to put the FDATE output into
  746. environment variable TEMPVAR.
  747. =======================================================================
  748. FDATE /FF /At /Ominute# | GET ZE /Vtempvar >nul
  749. REN online.log %tempvar%.log
  750. SET tempvar=
  751.  
  752.  
  753.  
  754. =======================================================================
  755. EXAMPLE #5
  756. Find calendar date corresponding to Julian date 1992:045
  757. =======================================================================
  758. FDATE /Ff /A1992045  /Iccyyjjj  /Od1
  759.  
  760.  
  761.  
  762. =======================================================================
  763. EXAMPLE #6
  764. Check to see if parameter %1 is a valid year (CCYY)
  765. =======================================================================
  766. @echo off
  767. rem determine if value sent in through parameter %1 is a valid year
  768. Fdate /Ff /Imm-dd-ccyy /A01-01-%1 /Od1 >nul
  769. if errorlevel 1 echo Parm 1 was not a valid year: %1
  770. if errorlevel 1 goto endit
  771.  
  772. echo PUT YOUR BATCH PROCESSING HERE, USING YEAR VALUE OF: %1
  773.  
  774. :endit
  775.  
  776.  
  777.  
  778. =======================================================================
  779. EXAMPLE #7
  780. Find the 4th Thursday in November (Thanksgiving)
  781. =======================================================================
  782. Fdate /Fw /D5 /N4 /A11-01-%year% /Imm-dd-ccyy /Od1 /P"Thanksgiving: "
  783.  
  784.  
  785.  
  786. =======================================================================
  787. EXAMPLE #8
  788. Show the number of the anniversary for some special event.
  789. =======================================================================
  790. SEE HOLIDAYS.BAT
  791.  
  792.  
  793. =======================================================================
  794. EXAMPLE #9
  795. Run a program once a day, when you boot for the first time that day.
  796. =======================================================================
  797. @echo off
  798. cls
  799.  
  800. REM -------------------------------------------------------------------
  801. REM Run daily processing once a day.  Put this code in AUTOEXEC.BAT.
  802. REM This batch file requires DOS 3.3+, since it uses CALL.
  803. REM -------------------------------------------------------------------
  804. if not exist LastRun.BAT goto RunNow
  805. REM LastRun.Bat will set env var LASTRUN to date AUTOEXEC was last run.
  806. call LastRun.BAT
  807.  
  808. REM Compare today's date to date in LASTRUN
  809. Fdate /Fcomp /Imm-dd-ccyy /At /B%LastRun% /P"@set COMP=">junktemp.BAT
  810. call junktemp.BAT
  811. del  junktemp.BAT
  812.  
  813. IF (%COMP%)==(EQ) goto NoRun
  814. REM if user reset system clock, today's date may be less than LASTRUN
  815. IF (%COMP%)==(LT) goto NoRun
  816.  
  817. rem Daily processing hasn't been run today. Run it.
  818.  
  819. echo RUNNING ONCE A DAY PROCESSING: Job 1
  820. echo RUNNING ONCE A DAY PROCESSING: Job 2
  821. echo RUNNING ONCE A DAY PROCESSING: ............. etc.
  822.  
  823. rem ------------------------------------------------------------------
  824. rem Save today's date in a new version of LastRun.BAT
  825. rem Note that this will be executed only if daily processing runs to
  826. rem completion without hanging the machine or aborting the batch file.
  827. rem ------------------------------------------------------------------
  828. Fdate /Ff /Omm-dd-ccyy /At /P"@set LastRun=">LastRun.BAT
  829.  
  830. :NoRun
  831. set LastRun=
  832. set COMP=
  833.  
  834. FDATE'S ALGORITHMS
  835. ==================
  836.  
  837.  
  838. FDATE IS DESIGNED FOR BUSINESS, NOT HISTORICAL, APPLICATIONS
  839. ============================================================
  840. FDATE is intended for business applications, not historical ones.
  841. As far as FDATE is concerned, the calendar has followed the same
  842. pattern, unchanged, since January 1, 0001.
  843.     -------------------------------------------------------------------
  844.     FDATE does not take into account historical changes in the calendar
  845.     such as the glitch in English dates that occurred when Britain
  846.     moved from the Julian to Gregorian calendar in the 18th century,
  847.     or Russia made the same move in the early 20th century.
  848.     -------------------------------------------------------------------
  849.  
  850.  
  851. FDATE'S BASE DATE
  852. =================
  853.   Internally, date manipulations are based on translating a calendar
  854.   date into an "absolute" or "TRUE Julian" date:  a date expressed
  855.   as the number of days from some day in the distant past.
  856.   FDATE's base date is January 1, 0001 (i.e. day 1 of month 1 of year 1)
  857.   FDATE's absolute date for January 1, 0001 is      1.
  858.   FDATE's absolute date for January 1, 1992 is 727198.
  859.  
  860.  
  861. FDATE'S LEAP YEAR ALGORITHM
  862. ===========================
  863.     Every year evenly divisible by 4 IS a leap year
  864.       EXCEPT THAT
  865.         Every year evenly divisible by 100 IS NOT a leap year
  866.           EXCEPT THAT
  867.             Every year evenly divisible by 400 IS a leap year
  868.     .
  869.     Using this algorithm
  870.          1983  is not a leap year
  871.          1984  is     a leap year
  872.          1900  is not a leap year
  873.          2000  is     a leap year
  874.  
  875.     See "A Machine Algorithm for Processing Calendar Dates", by
  876.          Henry F. Fliegel (Georgetown University Observatory) and
  877.          Thomas C. Van Flandern (U.S. Naval Observatory)
  878.          COMMUNICATIONS OF THE ACM, Volume 11, Number 10, October 1968
  879.  
  880. There is supposedly a new adjustment to the leapyear algorithm,
  881. which specifies the additional exception:
  882.  
  883.               EXCEPT THAT
  884.                 Every year evenly divisible by 4000 IS a leap year
  885.  
  886. See "Bit By Bit" column, COMPUTER LANGUAGE, November 1989, p. 148.
  887. This adjustment is not part of FDATE's leapyear algorithm.
  888. Unless your application is working with dates 2,000 years in the
  889. future, the lack of this exception will be irrelevant for you.
  890.  
  891. DEMONSTRATION BATCH FILES
  892. =========================
  893.    FDATE ships with a number of demonstration batch files.  These are
  894.    sample applications that illustrate some of the ways that FDATE
  895.    might be used to build applications.  They can be studied for
  896.    ideas for ways of using FDATE.  They can also be used "as is", or
  897.    copied and customized to build applications that meet your own
  898.    special needs.
  899.  
  900.  
  901.  
  902.  
  903.  
  904. DEMONSTRATION BATCH FILE: HOLIDAYS.BAT
  905. ======================================
  906.  
  907. HOLIDAYS without any parameters displays events in current year.
  908. HOLIDAYS with a year parameter  displays events in that    year.
  909.  
  910.    EXAMPLE: HOLIDAYS               displays events in current year
  911.    EXAMPLE: HOLIDAYS 1999          displays events in year 1999.
  912.  
  913. As the holidays are displayed, you can dump each screen display
  914. to a printer by pressing SHIFT+PRINTSCREEN.
  915.  
  916.  
  917.  
  918. DEMONSTRATION BATCH FILE: ALARM
  919. ===============================
  920. ALARM.BAT is like a simple alarm clock for your PC.  ALARM.BAT waits
  921. until a specified time, then triggers an alarm: it beeps and displays a
  922. message.  It continues until someone presses CONTROL-BREAK.
  923.  
  924. If you enter just "ALARM" at the DOS prompt, without any parameters,
  925. ALARM displays a HELP screen that shows how to use it.
  926.  
  927. ALARM uses ANSI control codes to control screen color and cursor
  928. placement, so it requires ANSI.SYS in order to work properly.
  929. If you are not using ANSI.SYS, it will display some garbage
  930. characters on your screen unless you modify the batch file to remove
  931. the ANSI control codes.
  932.  
  933.  USAGE   : ALARM                      shows current time in hhmm format
  934.  USAGE   : ALARM hhmm [msg]           waits until hhmm, then sounds an alarm
  935.  
  936.  EXAMPLE : ALARM 0930                 [sounds alarm at 9:30 am]
  937.  EXAMPLE : ALARM 930 Staff meeting    [sounds alarm at 9:30 am]
  938.  EXAMPLE : ALARM 1800                 [sounds alarm at 6:00 pm]
  939.  
  940.            For midnight, specify 0000 or 2400 for hhmm.
  941.  EXAMPLE : ALARM 2400  START MIDNIGHT BATCH RUN
  942.  
  943. The first thing that ALARM.BAT does is to change to the M: drive.  M:
  944. is presumed to be a RAM disk.   Before you can use ALARM.BAT, you
  945. should use your favorite text editor to change the RAM disk designation
  946. to point to your own RAM disk.  It is possible to run ALARM.BAT from a
  947. normal hard disk or floppy, but because ALARM.BAT does a LOT of disk
  948. activity, it is strongly recommended that you make your current
  949. directory a RAM disk before running it.
  950.  
  951. To prevent repeated disk accesses to find the FDATE program, you
  952. should also have FDATE on the RAM disk, or be using a cache.
  953.  
  954. USING ALARM TO CREATE RUN-IT
  955. ============================
  956.  
  957. You can copy ALARM.BAT to another batch file (say, RUN-IT.BAT) and
  958. modify it so that rather than sounding an alarm it triggers other
  959. activiites instead: runs a program or programs, or chains to another
  960. batch file, for example.
  961.  
  962. To create a generalized RUN-IT.BAT, you could use the words of the
  963. message to pass in the name of a batch file that you want to be run at
  964. a certain time, along with its parameters.  Make the triggered activity
  965. this:
  966.  
  967.     rem Note that earlier SHIFT has moved batch file name to parm 1.
  968.     rem run %1 batch file.
  969.     %1 %2 %3 %4 %5 %6 %7 %8 %9
  970.  
  971. Then entering this at the DOS prompt:
  972.  
  973.     RUN-IT 0001 BACKUP.BAT C: D: E:
  974.  
  975. would cause RUN-IT to wait until 1 minute past midnight, then
  976. run a batch file called BACKUP.BAT to backup drives C:, D:, and E:.
  977.  
  978.  
  979. DEMONSTRATION BATCH FILE: TIC.BAT
  980. =================================
  981.  
  982. TIC.BAT is a sample application that uses FDATE to create a "tickler
  983. file" batch file.  The default name for the file is C:\TICKLER.BAT.
  984.  
  985. In order to use TIC on a regular basis, you should:
  986.  
  987.    * Use your favorite text editor to modify TIC.BAT so that it
  988.      will use your favorite text editor in the EDIT function.
  989.      (TIC.BAT ships with the editor set to SPFPC).
  990.  
  991.    * If you wish, use your favorite text editor to modify the
  992.      first few lines of TIC.BAT, so the "SET TicBAT=" statement
  993.      sets TicBAT to a different file name for the tickler batch file.
  994.      Note that you must specify the full filename,
  995.      including path and extension.
  996.  
  997.    * Put TIC.BAT in a directory that is in your PATH.
  998.  
  999.    * add the following lines to your AUTOEXEC.BAT file:
  1000.  
  1001.          CLS
  1002.          rem show today's appointments
  1003.          call TIC T
  1004.          echo.
  1005.  
  1006.          rem show tomorrow's appointments [note space betwee T and +1]
  1007.          call TIC T +1
  1008.          echo.
  1009.  
  1010.          pause
  1011.  
  1012.      This will cause the tickler batch file to be run when you
  1013.      boot your computer, showing you your scheduled appointments.
  1014.  
  1015. HELP
  1016. ====
  1017. Running TIC without any parms will cause it to display a HELP screen.
  1018.   EXAMPLE: tic
  1019.  
  1020.  
  1021. ADDING A NEW TICKLE (SINGLE DATES)
  1022. ==================================
  1023. To add a new SINGLE DATE tickle, invoke TIC.  The first parm must be the
  1024. date of the desired tickle, in the format mm/dd/yy.  (You may use the
  1025. pseudodate TT for the current month or year, if you wish.)
  1026.  
  1027. This parm must be followed by a description of the appointment.
  1028.   * If no description is entered, TIC interprets the date in parm 1
  1029.     as a request to display the tickles for that date.
  1030. NOTE: DOS batch files strip commas out of their input parameters, so
  1031. any commas in your description will be lost.
  1032.  
  1033.   EXAMPLE: tic 5/5/92 Cinco de Mayo party w/ Susan: El Charro @ 6pm
  1034.   EXAMPLE: tic 5/5/tt Cinco de Mayo party w/ Susan: El Charro @ 6pm
  1035.  
  1036.  
  1037. ADDING A NEW TICKLE (REGULAR WEEKLY APPOINTMENTS)
  1038. =================================================
  1039. To add a new REGULAR APPOINTMENT tickle, invoke TIC.  The first two
  1040. parms must be the string "dow" (or "DOW") and the day-of-the-week
  1041. number of the day of the week (e.g. 2 for Monday).
  1042.  
  1043. These parms should be followed by a description of the appointment.
  1044.  
  1045.   EXAMPLE: tic dow 2 Regular Monday morning staff meeting @ 8:30 am
  1046.   EXAMPLE: TIC DOW 6 STANDING TENNIS DATE WITH JANICE AT 6:30
  1047.  
  1048.  
  1049. CHECKING YOUR TICKLES
  1050. =====================
  1051. You can check your tickler file appointments for a particular day at
  1052. any time by invoking TIC with only a date parm or the pseudodate T or
  1053. TODAY.
  1054.  
  1055.   EXAMPLE: tic t         displays appointments for today
  1056.   EXAMPLE: tic today     displays appointments for today
  1057.   EXAMPLE: tic 5/5/92    displays appointments for May 5, 1992
  1058.   EXAMPLE: tic 5/5/tt    displays appointments for May 5 of this year
  1059.   EXAMPLE: tic tt/5/tt   displays appointments for the 5th of this month
  1060.  
  1061. You can check your tickler file appointments for a date from one to
  1062. seven days in the future by invoking TIC with two parms: T (for today)
  1063. followed by a number of +1 through +7.  Unsigned numbers are treated
  1064. as if they have a plus sign.  Negative numbers will show appointments
  1065. for days in the past.
  1066.  
  1067.   EXAMPLE: tic t      displays appointments for today
  1068.   EXAMPLE: tic t  1   displays appointments for tomorrow
  1069.   EXAMPLE: tic t +1   displays appointments for tomorrow
  1070.   EXAMPLE: tic t +7   displays appointments for a week from today
  1071.   EXAMPLE: tic t -1   displays appointments for yesterday
  1072.  
  1073. Note that the space between the first parm "T" and the second, number
  1074. parm, is required:
  1075.  
  1076.   EXAMPLE: tic t+2    does not recognise "t+2" as "t +2".
  1077.                       Displays appointments for TODAY.
  1078.  
  1079. If the tickler batch file does not exist, nothing will be displayed.
  1080.  
  1081. REMOVING DEAD TICKLES
  1082. =====================
  1083. After a while the tickler batch file will become very long, filled with
  1084. "dead tickles".  You can edit it with a text editor to remove the dead
  1085. tickles:
  1086.  
  1087.   EXAMPLE: tic edit
  1088.   EXAMPLE: TIC ED
  1089.  
  1090. or simply delete it and let TIC create a new one the next time
  1091. you use TIC to add a tickle.
  1092.  
  1093. USE AND DISTRIBUTION OF FDATE
  1094. =============================
  1095.  
  1096. FDATE is freeware, or what is known as "zero-cost shareware".
  1097. FDATE is not what is technically called "public domain" software
  1098. because the author retains the copyright.  FDATE can, however,
  1099. be copied, used, and distributed freely as long as both FDATE.EXE
  1100. and its associated doc file (FDATE.DOC) and its demonstration batch
  1101. files (FDATEX.BAT, HOLIDAYS.BAT, TIC.BAT, ALARM.BAT) are not altered
  1102. and are distributed together.
  1103.  
  1104. FDATE can be included in shareware packages as long as both FDATE and
  1105. its related files are included in the shareware package.
  1106.  
  1107. If you have received FDATE as part of some larger shareware package,
  1108. please be aware that you may freely use, copy, and distribute FDATE
  1109. without paying a fee for, or registering, the larger package.
  1110.  
  1111. The author explicitly disavows any claim whatsoever about the
  1112. correctness or functionality of FDATE, its documentation, and its
  1113. demonstration batch files, and disclaims liability for anything and
  1114. everything bad that might happen in connection with, before, during, or
  1115. after using it.  I have tried to make FDATE work right, but everybody
  1116. makes mistakes, so you use FDATE at your own risk.
  1117.  
  1118. I don't know if people will find FDATE useful, and I'd like to find
  1119. out.  If you find FDATE useful and use it on a regular basis, I'd
  1120. appreciate it if you would drop me a short note via US mail or
  1121. CompuServe, telling me about how you are using FDATE.
  1122.  
  1123. If you need other input/output formats, or if you need a different
  1124. leapyear algorithm, please contact the author.
  1125.  
  1126.  
  1127.  
  1128.  
  1129. UPDATES AND CURRENT VERSION OF FDATE
  1130. ====================================
  1131.  
  1132. You will always be able to find the most recent version of FDATE on
  1133. CompuServe.  The filename will be FDATE.ZIP, and it will be available in
  1134. one of the libraries in the CIS:IBMSYS forum and one of the libraries in
  1135. the ZNT:UTILFORUM forum.  You can find it by using cross-library
  1136. searching, looking for the filename FDATE.ZIP or the keyword FDATE.
  1137.  
  1138. Feel free to post copies of FDATE.ZIP on any BBS that you wish, but
  1139. please do not upload it to any CompuServe library.  As long as I am the
  1140. only one putting copies of FDATE onto CompuServe, we can keep confusion
  1141. over versions to a minimum.
  1142.  
  1143. The current distribution package (FDATE.ZIP) contains the following:
  1144.  
  1145.        FDATE.EXE         [the FDATE program]
  1146.        FDATE.DOC         [this file, documentation for FDATE]
  1147.  
  1148.        FDATEX.BAT        [demonstration batch files]
  1149.        HOLIDAYS.BAT
  1150.        TIC.BAT
  1151.  
  1152.  
  1153. FDATE REVISION HISTORY
  1154. ======================
  1155.  
  1156. Letters appended to version numbers indicate modifications to
  1157. the doc files, without any modification to the FDATE.EXE software.
  1158. Asterisks (*) indicate most important changes in the new version.
  1159.  
  1160. 1.1   Oct 01, 1991
  1161.       First version of FDATE
  1162.  
  1163. 3.0a  Dec 27, 1991
  1164. *     =============== MAJOR BUG FIX ==============================
  1165. *     Fixed bug in TRUEDATE date arithmetic routine that caused
  1166. *     incorrect dates to be returned for the last 2 or 3 days of
  1167. *     some months.
  1168.  
  1169. 3.1a  Dec 28, 1991
  1170.       Fixed bug: error messages were ignoring the /P parm
  1171.  
  1172. 4.2b  Jan 06, 1992
  1173.       In HOLIDAYS.BAT:
  1174.       Fixed bug in algorithm for Ash Wednesday
  1175.       Corrected algorithm for Advent (thanks to L. Schliesser)
  1176.  
  1177. 4.4b  Jan 22, 1992
  1178.       In TIC.BAT:
  1179.       Fixed ability to list by date, which had been messed up when
  1180.          adding ability to accept +1, etc. as parms
  1181.  
  1182. 4.6a  Jan 27, 1992
  1183.       Fixed problem that prevented output from being redirected in
  1184.       version 4.5
  1185.  
  1186. 5.1a  Feb 09, 1992
  1187. *     Added julian INPUT formats yyjjj and CCyyjjj
  1188.       Added documentation on Fdate's century-assumption algorithm
  1189.  
  1190. 5.2a  Feb 10, 1992
  1191.       Relaxed the requirement that dates in JJJ must be zero-filled
  1192.         on the left to occupy all 3 digits.  JJJ can now be as
  1193.         little as 1 character long, and as many as 4 characters.
  1194.  
  1195. 5.3a  Feb 13, 1992
  1196.       Replaced "eng" language parameter with "us", in case
  1197.                there might be a need to distinguish American-style
  1198.                dates from British-style dates in the future.
  1199.  
  1200. 6.1a  Feb 14, 1992   *** MAJOR ENHANCEMENT ***
  1201. *     Added /V parm, which allows a user to have Fdate itself set an
  1202.       environment variable, rather than setting Evar by piping or
  1203.       redirecting Fdate's standard output.
  1204.  
  1205.       Added output formats MN (monthname) and MN3
  1206.       Added demo batch file DO-ONCE.BAT to fdate distribution ZIP file
  1207.  
  1208.       Modification log was getting very long, so deleted all docs on
  1209.       modifications before version 5.0 except for documentation of
  1210.       bug fixes.
  1211.